package com.hs.learn.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

/**
 * @Description: 临时emp 集合中的文档实体对象
 * @Author 胡尚
 * @Date: 2024/7/27 19:09
 */
@Data
@Document("emp")
@AllArgsConstructor
@NoArgsConstructor
public class Employee {

    @Id
    private Integer id;

    @Field("username")
    private String name;

    @Field
    private Integer age;

    @Field
    private Date cteateTime;

    @Transient
    private String script;
}
